//
// Created by rebeater on 2021/1/5.
// @brief file io
//
#include "nav_io.h"
#include <iomanip>
using namespace std;
/**
 * 输出IMU数据到文件或者控制台
 * @param os
 * @param imu
 * @return
 */
ostream &operator<<(ostream &os, ImuData &imu) {
    os << std::fixed << std::left << std::setw(10) << std::setprecision(5);
    os << imu.gpst << " ";
    os << std::fixed << std::left << std::setw(12) << std::setprecision(8);
    os << std::setw(12) << imu.gyro[0] << " " << imu.gyro[1] << " " << imu.gyro[2] << " ";
    os << std::setw(12) << imu.acce[0] << " " << imu.acce[1] << " " << imu.acce[2] << " ";
    os << endl;
    return os;
};

